<?php defined('IN_YuLin') || exit('NO PERMIT!'); ?>
{template index/header}

<div class="x-nav">
	<span class="layui-breadcrumb">
		<a>首页</a>
		<a>后台管理员</a>
		<a>管理员列表</a>
	</span>
	<a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
		<i class="layui-icon" style="line-height:30px">ဂ</i>
	</a>
	<a class="layui-btn layui-btn-small" style="line-height:1.6em;margin:3px 5px 0 0;float:right" href="?m={$m}&c={$c}&a=add" title="添加">
		<i class="layui-icon" style="line-height:30px">添加</i>
	</a>
</div>

<div class="x-body">
	<form action="?" method="post">
		<input type="hidden" name="m" value="{$m}" />
		<input type="hidden" name="c" value="{$c}" />
		<input type="hidden" name="a" value="sort" />
		<table class="layui-table">
			<thead>
                <tr>
                    <th width="16"><input type="checkbox" value="" id="check_box" onclick="selectall('ids[]');"></th>
                    <th width="40">ID</th>
                    <th>会员名</th>
                    <th>角色</th>
                    <th>姓名</th>
                    <th>电话</th>
                    <th>添加时间</th>
                    <th>状态</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                {loop $data as $val}
                <tr>
                    <td class="text-c"><input class="inputcheckbox " name="ids[]" value="{$val['id']}" type="checkbox"></td>
                    <td class="text-c">{$val['id']}</td>
                    <td class="text-c">{$val['username']}</td>
                    <td class="text-c">{$val['gname']}</td>
                    <td class="text-c">{$val['truename']}</td>
                    <td class="text-c">{$val['tel']}</td>
                    <td class="text-c">{date('Y/m/d H:i',$val['dateline'])}</td>
                    <td class="text-c">{if $val['status'] == 0}<span class="red">已锁定</span>{else}正常{/if}</td>
                    <td class="text-c">
                        <a href="?m={$m}&c={$c}&a=add&id={$val['id']}">编辑</a> |
                        {if $val['status']}
                        <a data-url="?m={$m}&c={$c}&a=del&id={$val['id']}" data-tips="确定锁定吗？" data-reload="1" href="javascript:void(0);" class="a-del">锁定</a>
                        {else}
                        <a data-url="?m={$m}&c={$c}&a=del&id={$val['id']}&flag=1" data-tips="确定解锁吗？" data-reload="1" href="javascript:void(0);" class="a-del">解锁</a>
                        {/if}
                    </td>
                </tr>
                {/loop}
            </tbody>
		</table>
		<div id="pages" class="layui-laypage">{$multi}</div>
	</form>
</div>

{template index/footer}